
import { _decorator, Component, Node, EditBox } from 'cc';
import { ListView } from '../component/ListView';
const { ccclass, property, type } = _decorator;

@ccclass('MainScene')
export class MainScene extends Component {

    @type(EditBox)
    itemCountEb: EditBox = null!

    @type(ListView)
    listView: ListView = null!;

    private onClickToCreateItem() {
        const itemCount = Number(this.itemCountEb.string);
        if (!isNaN(itemCount)) {
            let data: string[] = new Array<string>(itemCount)
            this.listView.setData(data);
        }
    }
}
